<template>
	<view class="container">
		<view class="info-box">
			<image src="/static/time.png" mode="scaleToFill"></image>
			信息已提交等待后台审核
		</view>

		<button type="primary" class="add-btn" @click="complete">完成</button>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex'
	export default {
		data() {
			return {}
		},
		onLoad() {
			this.loadData()
		},
		computed: {
			...mapState(['hasLogin', 'userInfo'])
		},
		methods: {
			loadData() {
				this.$api.request('/zruser/testToken', {}, {
					method: 'GET',
					contetn: 'application/x-www-form-urlencoded'
				}).then(res => {
					let userInfo = res.data
					userInfo.token = this.userInfo.token
					this.$store.commit('login', res.data)
				})
			},
			//提交
			complete(e) {
				uni.switchTab({
					url: `/pages/index/index`
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		padding-top: 150upx;
		background-color: #fff;
	}

	.info-box {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		width: 710upx;
		margin: 0 auto 30upx;
		font-size: $base-font-base;
		line-height: 40upx;

		image {
			margin-bottom: 30upx;
			width: 155upx;
			height: 108upx;
		}
	}

	/* #ifdef H5 */
	@media screen and (min-width: 750px) {
		page {
			padding-top: 150px;
		}

		.info-box {
			width: 710px;
			margin: 0 auto 30px;
			font-size: 16px;
			line-height: 40px;

			image {
				margin-bottom: 30px;
				width: 155px;
				height: 108px;
			}
		}
	}

	/* #endif */
</style>
